import 'package:chat_app_project/generated/json/base/json_convert_content.dart';
import 'package:chat_app_project/models/user_login_info_entity.dart';

UserLoginInfoEntity $UserLoginInfoEntityFromJson(Map<String, dynamic> json) {
	final UserLoginInfoEntity userLoginInfoEntity = UserLoginInfoEntity();
	final DateTime? activeTime = jsonConvert.convert<DateTime>(json['activeTime']);
	if (activeTime != null) {
		userLoginInfoEntity.activeTime = activeTime;
	}
	final String? authType = jsonConvert.convert<String>(json['authType']);
	if (authType != null) {
		userLoginInfoEntity.authType = authType;
	}
	final String? avatar = jsonConvert.convert<String>(json['avatar']);
	if (avatar != null) {
		userLoginInfoEntity.avatar = avatar;
	}
	final int? collects = jsonConvert.convert<int>(json['collects']);
	if (collects != null) {
		userLoginInfoEntity.collects = collects;
	}
	final int? contents = jsonConvert.convert<int>(json['contents']);
	if (contents != null) {
		userLoginInfoEntity.contents = contents;
	}
	final int? follows = jsonConvert.convert<int>(json['follows']);
	if (follows != null) {
		userLoginInfoEntity.follows = follows;
	}
	final int? fans = jsonConvert.convert<int>(json['fans']);
	if (fans != null) {
		userLoginInfoEntity.fans = fans;
	}
	final int? likes = jsonConvert.convert<int>(json['likes']);
	if (likes != null) {
		userLoginInfoEntity.likes = likes;
	}
	final int? reports = jsonConvert.convert<int>(json['reports']);
	if (reports != null) {
		userLoginInfoEntity.reports = reports;
	}
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		userLoginInfoEntity.id = id;
	}
	final String? inviteCode = jsonConvert.convert<String>(json['inviteCode']);
	if (inviteCode != null) {
		userLoginInfoEntity.inviteCode = inviteCode;
	}
	final String? ip = jsonConvert.convert<String>(json['ip']);
	if (ip != null) {
		userLoginInfoEntity.ip = ip;
	}
	final String? ipAddress = jsonConvert.convert<String>(json['ipAddress']);
	if (ipAddress != null) {
		userLoginInfoEntity.ipAddress = ipAddress;
	}
	final String? loginTime = jsonConvert.convert<String>(json['loginTime']);
	if (loginTime != null) {
		userLoginInfoEntity.loginTime = loginTime;
	}
	final String? nickName = jsonConvert.convert<String>(json['nickName']);
	if (nickName != null) {
		userLoginInfoEntity.nickName = nickName;
	}
	final int? parentId = jsonConvert.convert<int>(json['parentId']);
	if (parentId != null) {
		userLoginInfoEntity.parentId = parentId;
	}
	final DateTime? registerTime = jsonConvert.convert<DateTime>(json['registerTime']);
	if (registerTime != null) {
		userLoginInfoEntity.registerTime = registerTime;
	}
	final String? sex = jsonConvert.convert<String>(json['sex']);
	if (sex != null) {
		userLoginInfoEntity.sex = sex;
	}
	final String? status = jsonConvert.convert<String>(json['status']);
	if (status != null) {
		userLoginInfoEntity.status = status;
	}
	final UserLoginInfoTokenVo? tokenVo = jsonConvert.convert<UserLoginInfoTokenVo>(json['tokenVo']);
	if (tokenVo != null) {
		userLoginInfoEntity.tokenVo = tokenVo;
	}
	final String? userName = jsonConvert.convert<String>(json['userName']);
	if (userName != null) {
		userLoginInfoEntity.userName = userName;
	}
	final UserLoginInfoWalletVo? walletVo = jsonConvert.convert<UserLoginInfoWalletVo>(json['walletVo']);
	if (walletVo != null) {
		userLoginInfoEntity.walletVo = walletVo;
	}
	return userLoginInfoEntity;
}

Map<String, dynamic> $UserLoginInfoEntityToJson(UserLoginInfoEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['activeTime'] = entity.activeTime?.toIso8601String();
	data['authType'] = entity.authType;
	data['avatar'] = entity.avatar;
	data['collects'] = entity.collects;
	data['contents'] = entity.contents;
	data['follows'] = entity.follows;
	data['fans'] = entity.fans;
	data['likes'] = entity.likes;
	data['reports'] = entity.reports;
	data['id'] = entity.id;
	data['inviteCode'] = entity.inviteCode;
	data['ip'] = entity.ip;
	data['ipAddress'] = entity.ipAddress;
	data['loginTime'] = entity.loginTime;
	data['nickName'] = entity.nickName;
	data['parentId'] = entity.parentId;
	data['registerTime'] = entity.registerTime?.toIso8601String();
	data['sex'] = entity.sex;
	data['status'] = entity.status;
	data['tokenVo'] = entity.tokenVo?.toJson();
	data['userName'] = entity.userName;
	data['walletVo'] = entity.walletVo?.toJson();
	return data;
}

UserLoginInfoTokenVo $UserLoginInfoTokenVoFromJson(Map<String, dynamic> json) {
	final UserLoginInfoTokenVo userLoginInfoTokenVo = UserLoginInfoTokenVo();
	final String? loginToken = jsonConvert.convert<String>(json['loginToken']);
	if (loginToken != null) {
		userLoginInfoTokenVo.loginToken = loginToken;
	}
	final int? memberId = jsonConvert.convert<int>(json['memberId']);
	if (memberId != null) {
		userLoginInfoTokenVo.memberId = memberId;
	}
	final String? refreshToken = jsonConvert.convert<String>(json['refreshToken']);
	if (refreshToken != null) {
		userLoginInfoTokenVo.refreshToken = refreshToken;
	}
	return userLoginInfoTokenVo;
}

Map<String, dynamic> $UserLoginInfoTokenVoToJson(UserLoginInfoTokenVo entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['loginToken'] = entity.loginToken;
	data['memberId'] = entity.memberId;
	data['refreshToken'] = entity.refreshToken;
	return data;
}

UserLoginInfoWalletVo $UserLoginInfoWalletVoFromJson(Map<String, dynamic> json) {
	final UserLoginInfoWalletVo userLoginInfoWalletVo = UserLoginInfoWalletVo();
	final int? coin = jsonConvert.convert<int>(json['coin']);
	if (coin != null) {
		userLoginInfoWalletVo.coin = coin;
	}
	final int? freezeMoney = jsonConvert.convert<int>(json['freezeMoney']);
	if (freezeMoney != null) {
		userLoginInfoWalletVo.freezeMoney = freezeMoney;
	}
	final int? memberId = jsonConvert.convert<int>(json['memberId']);
	if (memberId != null) {
		userLoginInfoWalletVo.memberId = memberId;
	}
	final int? money = jsonConvert.convert<int>(json['money']);
	if (money != null) {
		userLoginInfoWalletVo.money = money;
	}
	return userLoginInfoWalletVo;
}

Map<String, dynamic> $UserLoginInfoWalletVoToJson(UserLoginInfoWalletVo entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['coin'] = entity.coin;
	data['freezeMoney'] = entity.freezeMoney;
	data['memberId'] = entity.memberId;
	data['money'] = entity.money;
	return data;
}
